<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Forgot Password</title>
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-GLhlTQ8iRABdZLl6O3oVMWSktQOp6b7In1Zl3/Jr59b6EGGoI1aFkw7cmDA6j6gD" crossorigin="anonymous">
    <style>
        body {
            background-color: #f8f9fa; /* Light gray background */
        }
        .container {
            max-width: 400px;
            margin: 100px auto;
            background-color: white;
            padding: 30px;
            border-radius: 8px;
            box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); /* Subtle shadow */
        }
        .form-label {
            font-weight: bold;
        }
        .btn-primary {
            background-color: #007bff; /* Standard Bootstrap blue */
        }
    </style>
</head>
<body>
    <div class="container">
        <h2 class="text-center mb-4">Forgot Password</h2>
        <form action="{% url 'reset_pwd' %}" method="post">
            {% csrf_token %}
            <div class="mb-3">
                <label for="email" class="form-label">账号邮箱</label>
                <input type="email" class="form-control" name="email" id="email" value="{{ email }}" required>
            </div>
            <div class="mb-3">
                <label for="fullname" class="form-label">真实姓名</label>
                <input type="text" class="form-control" name="fullname" id="fullname" value="{{ fullname }}" required>
            </div>
            <div class="mb-3">
                <label for="nationalId" class="form-label">身份证号</label>
                <input type="text" class="form-control" name="id_number" id="nationalId" value="{{ id_number }}" required>
            </div>
            <div class="mb-3">
                <label for="newPassword" class="form-label">New Password</label>
                <input type="password" class="form-control" name="newpwd" id="newPassword" value="{{ new_password }}" required>
            </div>
            <div class="mb-3">
                <label for="confirmPassword" class="form-label">Confirm New Password</label>
                <input type="password" class="form-control" name="confpwd" id="confirmPassword" value="{{ confirm_password }}" required>
            </div>
            <div class="mb-3">
                {% if error_msg %}
                <div class="alert alert-danger">{{ error_msg }}</div>
                {% endif %}
                {% if success_msg %}
                <div class="alert alert-success">{{ success_msg }}</div>
                {% endif %}
            </div>
            <div class="d-grid gap-2">
                <button type="submit" class="btn btn-primary">Reset Password</button>
            </div>
        </form>
    </div>

    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/js/bootstrap.bundle.min.js" integrity="sha384-w76AqPfDkMBDXo30jS1Sgez6pr3x5MlQ1ZAGC+nuZB+EYdgRZgiwxhTBTkF7CXvN" crossorigin="anonymous"></script>
</body>
</html>